package com.cooper.controllers.seller;

import org.springframework.beans.factory.annotation.Autowired;

import com.cooper.constants.DisTypeConstants;
import com.cooper.controllers.Controller;
import com.cooper.entity.DisplayPicConfigListDo;
import com.cooper.pagination.PageInfo;
import com.cooper.pagination.PageResult;
import com.cooper.service.admin.DisplayPicConfigService;
import com.cooper.vo.DisplayPicConfigVo;

import net.paoding.rose.web.Invocation;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.annotation.rest.Post;

public class LookbookController extends Controller {
	
	@Autowired
	private DisplayPicConfigService displayPicConfigService;
	
	@Get @Post
	public String execute(Invocation inv){
		DisplayPicConfigVo queryParamVo = new DisplayPicConfigVo();
		queryParamVo.setStatus(DisplayPicConfigListDo.DISPLAY_YES);
		queryParamVo.setDisType(DisTypeConstants.LOOKBOOK_MAGAZINE);
		PageInfo pageInfo = new PageInfo();
		pageInfo.setPageSize(8);
		PageResult<DisplayPicConfigVo> magazineData = this.displayPicConfigService.queryDisplayPicConfigPage(queryParamVo, pageInfo);
		inv.addModel("magazineList", magazineData.getResult());
		return "lookbook";
	}

}
